#include <iostream>
#include <vector>
using namespace std;

int main() {
	int bx, by, mx, my;
	cin >> bx >> by >> mx >> my;
	int ans = 0;
	vector<vector<long long>> vi(bx + 1, vector<long long>(by + 1, -1));
	vi[0][0] = 1;
	auto dfs = [&](auto && dfs,int x, int y) {
		if (x < 0 || y < 0 || vi[x][y] != -1)
			return;
        
		if ((x - mx) * (x - mx) + (y - my) * (y - my) == 5)
		{
            vi[x][y] = 0;
			return;
		}
		if (x == mx && y == my)
		{
            vi[x][y] = 0;
			return;
		}
		dfs(dfs,x - 1, y);
		dfs(dfs,x, y - 1);
        vi[x][y] = 0;
		if (x > 0)
			vi[x][y] += vi[x - 1][y];
		if (y > 0)
			vi[x][y] += vi[x][y - 1];
	};
	dfs(dfs,bx, by);
	cout << vi[bx][by] << endl;
	return 0;
}